#! /usr/bin/perl

$s = <STDIN>;
chomp($n = <STDIN>);
print $s x $n;
